package com.zengqingfa.examples.mybatisplus.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zengqingfa.examples.mybatisplus.entity.User;
import com.zengqingfa.examples.mybatisplus.entity.UserHistory;
import com.zengqingfa.examples.mybatisplus.mapper.UserHistoryMapper;
import com.zengqingfa.examples.mybatisplus.mapper.UserMapper;
import com.zengqingfa.examples.mybatisplus.service.UserHistoryService;
import com.zengqingfa.examples.mybatisplus.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @fileName: UserServiceImpl
 * @author: zengqf3
 * @date: 2021-3-2 14:59
 * @description:
 */
@Service
public class UserHistoryServiceImpl extends ServiceImpl<UserHistoryMapper, UserHistory> implements UserHistoryService {

    @Autowired
    private UserHistoryMapper userHistoryMapper;

    @Override
    public IPage<UserHistory> selectUserPage(UserHistory userHistory) {
        return userHistoryMapper.selectPage(new Page<>(1, 2), userHistory);
    }

    @Override
    public UserHistory selectById(Long id) {
        return userHistoryMapper.selectById(id);
    }
}
